package org.imlinker.plugin.say;

import java.net.Authenticator;
import java.net.PasswordAuthentication;

public class DefaultAuthenticator extends Authenticator {

	public DefaultAuthenticator(String user, String password) {
		this.user = user;
		this.password = password;
	}

	public PasswordAuthentication getPasswordAuthentication() {
		System.out.println("user:" + user + ";password:" + password);
		return new PasswordAuthentication(user, password.toCharArray());
	}

	public String getUser() {
		return user;
	}

	public void setUser(String newUser) {
		this.user = newUser;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String newPassword) {
		this.password = newPassword;
	}

	private String user;

	private String password;
}
